export interface Department {
  id: string;
  name: string;
  parent?: Department;
  manager?: User;
}

export interface Track {
  id: string;
  name: string;
  code: string;
  type: string;
  status: string;
  description: string;
}

export interface Lock {
  id: string;
  name: string;
  department: string;
  keyId: string;
  status: 'unlocked' | 'locked' | 'faulty' | 'maintenance';
  lastOperationTime: string;
}

export interface LockRecord {
  id: string;
  lockName: string;
  keyName: string;
  keyType: 'bluetooth' | 'nfc';
  taskName: string;
  department: string;
  user: string;
  type: 'open' | 'close';
  time: string;
  result: 'success' | 'failure';
  reason?: string;
}

export interface Role {
  id: string;
  name: string;
  description: string;
  permissions: string[];
}

export interface User {
  id: string;
  employeeId: string;
  username: string;
  name: string;
  department: Department;
  role: Role;
  email: string;
  phone: string;
  status: string;
  lastLogin: string;
  password: string;
}

export interface Access {
  id: string;
  name: string;
  location: string;
  type: string;
  status: string;
  lastMaintenance: string;
  track?: Track; // 关联的单个股道
} 